package com.yzy.fly.boot.log;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yzy.fly.api.annotation.ApiListenerIgnore;
import com.yzy.fly.api.function.manage.FlyApi;
import com.yzy.fly.kernel.service.FlyCrudService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@ApiListenerIgnore
public class FlyAppLogService extends FlyCrudService<Long, FlyAppLog> {

    @Autowired
    private FlyAppLogMapper flyAppLogMapper;

    public boolean isSaveOrUpdate(FlyApi m){
        if (m != null) {
            return false;
        }
        return true;
    }

    public FlyAppLog startupId(String startupId){
        QueryWrapper<FlyAppLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("startupId",startupId);
        FlyAppLog flyAppLog = flyAppLogMapper.selectOne(queryWrapper);
        return flyAppLog;
    }

}
